/*
 * ksLog.cpp
 *
 *  Created on: Aug 5, 2011
 *      Author: wang
 */

#include "ksLog.h"
#include <string>
#include "ksDefines.h"
#include <iostream>
using namespace std;

void ksLog::log(const char* file, int line, const std::string & content)
{
    cout << "[" << file << "," << line << "]:";
    if( content.length( )  )
    {
        cout << content.length() << "," << content.c_str() << endl;
    }
}

void ksLog::log(const char* file, int line, const char *content)
{
    log(file, line, std::string(content));
}

void ksLog::log(const char* file, int line, const DATA & data)
{
    cout << "[" << file << "," << line << "]:" << data.length << "," << data.ptr << endl;
}

